import React from "react";
import Card from "./card";
import styles from "../css/confirmDialog.module.css";

interface MyComponentProps {
  confirm?: () => void; // 函数类型
  cancel?: () => void;
}

//rfc命令产生的
export default function confirmDialog(props: MyComponentProps) {
  return (
    <Card className={styles.container}>
      <div className={styles.content}>是否确认删除？</div>
      <div className={styles.bt}>
        <button onClick={props.confirm}>确认</button>
        <button onClick={props.cancel}>取消</button>
      </div>
    </Card>
  );
}
